package nowCoder;

/**
 * Created by Ghost on 2015/4/8.
 */
public class ReplaceSpace {
    public String replaceSpace(StringBuffer str) {
        return str.toString().replaceAll(" ","%20");
    }

    public static void main(String[] args){
        ReplaceSpace replaceSpace = new ReplaceSpace();

        System.out.println(replaceSpace.replaceSpace(new StringBuffer("We Are Happy")));
    }
}
